package design_patterns

import "fmt"

type ChineseMobile struct{}

func (cm ChineseMobile) BatteryCharging(c ChineseStanderdSource) {
	c.ChargingToChinesMobile()
	fmt.Println("正在充电中...")
}

type ChineseStanderdSource interface {
	ChargingToChinesMobile()
}

type ChineseElectricSource struct{}

func (c ChineseElectricSource) ChargingToChinesMobile() {
	fmt.Println("给中国手机充电")
}

type AmericanElectricSource struct {
}

func (a AmericanElectricSource) ChargingToEnglishMobile() {
	fmt.Println("给美国手机充电")
}

type Adapter struct {
	AmericanElectricSource
}

func (a Adapter) ChargingToChinesMobile() {
	a.ChargingToEnglishMobile()
}
